home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2008 February
/
PCWFEB08.iso
/
Software
/
Resources
/
Developers
/
Alleycode HTML Editor 2.2
/
alleycodesetup.exe
/
{app}
/
PHP
/
count.php
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
PHP Script
|
2002-11-19
|
429 b
|
20 lines
<?php
//create a file with the number "1". Name it "count.dat".
//Upload it in the same directory as "count.php". and schmod it 777.
$counter_file = "count.dat";
if(!($fp = fopen($counter_file, "r"))) die ("Cannot open $counter_file.");
$counter = (int) fread($fp, 20);
fclose($fp);
$counter++;
echo "You're visitor No. $counter.";
$fp = fopen($counter_file, "w");
fwrite($fp, $counter);
fclose($fp);
?>